﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Shipu_Week_List.aspx.cs"
    Inherits="Catering.Catering_Page.Caipin.Shipu_Week_List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>周食谱清单</title>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Scripts/zhezhao.js" type="text/javascript"></script>
    <script src="../../Style/xxk.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../../Scripts/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="../../Style/head.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/center.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/zhezhao.css" />
    <style type="text/css">
        .float_left
        {
            float: left;
        }
        .float_right
        {
            float: right;
        }
        .top_li_css
        {
            height: 31px;
            line-height: 31px;
            width: 1000px;
            margin: 0px auto;
            background: url(../../Images/nav2_bg.gif) repeat-x 0px 0px;
        }
        .top_li_css ul
        {
            width: 700px;
        }
        .top_li_css li
        {
            float: left;
            width: 100px;
        }
        #top_title
        {
            width: 1000px;
            background: url(../../Images/table_top.gif) 0 0 no-repeat;
            height: 33px;
            overflow: hidden;
            color: #fff;
        }
        .table_zspqd
        {
            width: 800px;
            height: auto;
            background-color: #CECECE;
        }
        .table_zspqd th
        {
            background: url("../../Images/th_02bg.gif") repeat-x 0px 0px;
            height: 28px;
            line-height: 28px;
        }
        .table_zspqd tr
        {
            background-color: #ffffff;
            line-height: 28px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="div_se_2" class="nav_se top_li_css" style="display: block">
        <div class="nav_se_1 float_left">
            <img src="../../Images/nav2_bg1.gif" /></div>
        <ul>
            <li><a href="#"><span class="lvse_border">周食谱清单</span></a></li>
            <li><a href="Shipu_Week_Check.aspx"><span class="feise_border">周食谱检查表</span></a></li>
        </ul>
        <div class="nav_se_3 float_right">
            <img src="../../Images/nav2_bg2.gif" /></div>
    </div>
    <div id="mk_1" style="display: block">
        <div class="Center_Content" id="div2_5" style="height: 480px;">
            <div class="div_0207 left_width500" style="height: 480px; width: 100%; border: 0px;">
                <h1 id="top_title">
                    <img src="../../Images/cp_h1_03.gif" />周食谱清单</h1>
                <div style="border: #1355a4 1px solid; height: 395px; padding-bottom: 40px; overflow-y: auto">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top: 10px;
                        overflow: visible;">
                        <thead style="background-color: #E5F1FD; border: 1px solid #C2DEF6;">
                            <tr>
                                <td height="34" width="75" align="right">
                                    作业区：
                                </td>
                                <td width="110">
                                    <asp:DropDownList ID="Dr_Operaction" runat="server" CssClass="select_input_bg" Width="100"
                                        AutoPostBack="True" OnSelectedIndexChanged="Dr_Operaction_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td width="45" align="right">
                                    班组：
                                </td>
                                <td width="110">
                                    <asp:DropDownList ID="Dr_Class" runat="server" CssClass="select_input_bg" Width="100">
                                    </asp:DropDownList>
                                </td>
                                <td width="70" align="right">
                                    选择年月：
                                </td>
                                <td width="90">
                                    <asp:TextBox ID="Txt_Date" runat="server" CssClass="input_bg" Width="80" OnTextChanged="Txt_Date_TextChanged"
                                        AutoPostBack="True"></asp:TextBox>
                                </td>
                                <td width="90">
                                    <asp:DropDownList ID="dr_select_Week" runat="server" CssClass="select_input_bg" Width="80">
                                        <asp:ListItem>选择周</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td width="100" align="right">
                                    <asp:Button ID="but_Seach" runat="server" OnClick="but_Seach_Click" CssClass="input_btn_a"
                                        Text="查　询"></asp:Button>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td width="100" align="right">
                                    <asp:Button ID="but_out_Excel" runat="server" OnClick="but_out_Excel_Click" CssClass="input_btn_a"
                                        Text="导出Excel"></asp:Button>
                                </td>
                                <td width="10">
                                </td>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="14" align="center">
                                    <table cellpadding="0" cellspacing="0" border="0" width="80%">
                                        <tr>
                                            <td height="30">
                                                单位：<asp:Label ID="txt_danwei" runat="server" Text=""></asp:Label>
                                            </td>
                                            <td>
                                                日期：<asp:Label ID="txt_riqi" runat="server" Text=""></asp:Label>
                                            </td>
                                            <td>
                                                版本：<asp:Label ID="txt_banben" runat="server" Text=""></asp:Label>
                                            </td>
                                            <td>
                                                受控号：<asp:Label ID="txt_shoukonghao" runat="server" Text=""></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="14" align="center">
                                    <div>
                                        <table border="0" cellpadding="0" cellspacing="1" align="center" class="table_zspqd">
                                            <thead>
                                                <tr>
                                                    <th>
                                                        餐别
                                                    </th>
                                                    <th>
                                                        星期一
                                                    </th>
                                                    <th>
                                                        星期二
                                                    </th>
                                                    <th>
                                                        星期三
                                                    </th>
                                                    <th>
                                                        星期四
                                                    </th>
                                                    <th>
                                                        星期五
                                                    </th>
                                                    <th>
                                                        星期六
                                                    </th>
                                                    <th>
                                                        星期日
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <%if (this.dt_Food != null && this.dt_Food.Rows.Count > 0)
                                                  {
                                                      foreach (System.Data.DataRow row in this.dt_Food.Rows)
                                                      { 
                                                %>
                                                <tr>
                                                    <td style="border:1px solid #000;">
                                                        <%=row["FMName"].ToString()%>
                                                    </td>
                                                    <%
                                                        for (int j = 0; j < this.strWeek.Length; j++)
                                                        {
                                                    %>
                                                    <td style="border:1px solid #000;">
                                                        <%
                                                            string rowid = row["id"].ToString() == "4" ? "2" : row["id"].ToString();
                                                            this.LoadDishByWeek(strWeek[j], rowid);
                                                            if (this.DishList != null && this.DishList.Rows.Count > 0)
                                                            {
                                                        %>
                                                        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                                            <%
                                                                int zao = 0;
                                                                int qita = 0;
                                                                foreach (System.Data.DataRow row_dish in this.DishList.Rows)
                                                                {
                                                                    if (row_dish["FMID"].ToString() == "1")
                                                                    {
                                                                        if (zao == 3) break;
                                                                        if (row_dish["youxian"].ToString() == "1")
                                                                        {
                                                                            zao++;
                                                                            %>
                                                                            <tr>
                                                                                <td>
                                                                                    <%=row_dish["Name"].ToString()%>
                                                                                </td>
                                                                            </tr>
                                                                            <%
                                                                        }
                                                              }
                                                                    else if (qita<6)
                                                              {
                                                                  qita++;
                                                            %>
                                                            <tr>
                                                                <td>
                                                                    <%=row_dish["Name"].ToString()%>
                                                                </td>
                                                            </tr>
                                                            <%
                                                                }
                                              }
                                                            %>
                                                        </table>
                                                        <%
}    
                                                        %>
                                                    </td>
                                                    <%
                                                        }
                                                    %>
                                                </tr>
                                                <%
                                                    }
                                  } %>
                                            </tbody>
                                        </table>
                                        <br />
                                        <br />
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div id="mk_2">
    </div>
    <div style="height: 10px; clear: both;">
    </div>
    <div class="footer">
        <strong>中海油能源发展配餐服务公司渤海自营油田作业公司&nbsp;&nbsp;版权所有@CopyRight 2012</strong><span>技术支持：北京天择嘉业科技有限公司</span>
    </div>
    </form>
</body>
</html>
